package com.company.clientscard.shared.requestfactory;

import java.util.List;

import com.company.clientscard.server.service.DaoLocator;
import com.company.clientscard.server.service.UserController;
import com.company.clientscard.shared.proxy.UserProxy;
import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.RequestFactory;
import com.google.web.bindery.requestfactory.shared.Service;

public interface UsersRequestFactory extends RequestFactory {

	@Service(value = UserController.class, locator = DaoLocator.class)
	public interface UsersRequestContext extends RequestContext {
		Request<UserProxy> findById(Long id);

		Request<UserProxy> update(UserProxy user);

		Request<Void> save(UserProxy user);

		Request<List<UserProxy>> findAll();

		Request<List<UserProxy>> findAll(int firstRow, int numberOfRows);
	}

	UsersRequestContext context();
}
